package com.pine.dbant.core.service.impl;

import com.pine.dbant.common.plugin.Plugin;
import com.pine.dbant.common.plugin.PluginFactory;
import com.pine.dbant.common.plugin.PluginMeta;
import com.pine.dbant.common.plugin.PluginType;
import com.pine.dbant.core.service.PluginService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author xiaoyuan
 * @create 2022/11/30 9:59
 **/
@Service
public class PluginServiceImpl  implements PluginService {


    @Autowired
    private PluginFactory pluginFactory;

    @Override
    public Plugin getPlugin(String name) {
        return pluginFactory.getPlugin(name);
    }

    @Override
    public PluginMeta getPluginMeta(String name) {
        return pluginFactory.getPluginMeta(name);
    }

    @Override
    public List<PluginMeta> getPlugins(PluginType pluginType) {
        return pluginFactory.getPlugins(pluginType);
    }
}
